﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="singleapplyVote.aspx.cs"
    Inherits="BOH.Interview.singleapplyVote" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>上海市人才卫生评审系统--投票</title>
    <link href="../style/css.css" type="text/css" rel="Stylesheet" />

    <script src="../js/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../js/common.js" type="text/javascript"></script>
    <style>
        .infoStyle
        {
            font-size:22px;
            color:Blue;
            font-weight:bolder;
        }
       .infoStyle td
        {
        	height:50px;
        }
    </style>
</head>
<body>

    <form id="form1" runat="server">
    <div style="margin-top:10px;">
        <center>
            <table cellpadding="0" cellspacing="0" border="0" width="98%">
                <tr>
                    <td width="50%">
                        <table cellpadding="0" cellspacing="0" border="0" width="100%" class="infoStyle">
                            <tr>
                                <td width="70%" align="right">
                                    申报人员：
                                </td>
                                <td align="left">&nbsp;
                                    <asp:Label ID="labApplyName" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td width="70%" align="right">
                                    申报职称：
                                </td>
                                <td align="left">&nbsp;
                                    <asp:Label ID="labJobRank" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td width="70%" align="right">
                                    学科组：
                                </td>
                                <td align="left">&nbsp;
                                    <asp:Label ID="labSubject" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td width="70%" align="right">
                                    申报专业：
                                </td>
                                <td align="left">&nbsp;
                                    <asp:Label ID="labSpeciality" runat="server"></asp:Label>
                                </td>
                            </tr>
                </table> </td>
                <td width="50%" align="left" valign="middle" style="padding-left:50px;">
                    
                    <asp:Image Width="200" Height="260" ID="ApplyImage" ImageUrl="~/images/d.png" runat="server" />
                </td>
                </tr>
            </table>
        </center>
    </div>
    <div>
        <center>
            <object id="Vote"  classid="clsid:{23096FC1-5DE4-447d-AC91-9EEFEA20FF5C}" codebase="../Activex/VoteActivex.cab#Version=2,0,0,0" Width="605" Height="312"> </object>
        </center>
    </div>
    <div style="margin-top:15px;">
        <center>
            <script>
                if(!document.getElementById("Vote").AgreeNumber)
                {
                    //alert("投票结束,请退出系统并关闭窗口.");
                    //window.close();
                }
                function getAllData()
                {
                    var Vote  = document.getElementById("Vote");
                    if(Vote)
                    {
                        var AgreeNu = Vote.AgreeNumber;
                        var AbstainNu = Vote.AbstainNumber;
                        var disapproveNu = Vote.DisapproveNumber;
                        var ActualNu = Vote.ActualNumber;
                        if((AgreeNu == "0" || AgreeNu.lenght==0)&&
                            (AbstainNu == "0" || AbstainNu.length==0)&&
                            (disapproveNu == "0" || disapproveNu.length ==0))
                        {
                            alert("请结束投票后，再保存数据.");
                            return false;
                        }
                        else
                        {
                            $("#<%=hiddenActualNumber.ClientID %>").val(ActualNu);
                            $("#<%=hiddenAgreeNu.ClientID %>").val(AgreeNu);
                            $("#<%=HiddenAbstainNu.ClientID %>").val(AbstainNu);
                            $("#<%=HiddendisapproveNu.ClientID %>").val(disapproveNu);
                            return true;
                        }
                    }
                    else
                    {
                        alert("程序初始化失败");
                        return false;
                    }
                }
            </script>
            <asp:HiddenField ID="hiddenAgreeNu" Value="4"  runat="server"/>
            <asp:HiddenField ID="HiddenAbstainNu" Value="3"  runat="server"/>
            <asp:HiddenField ID="HiddendisapproveNu" Value="7"  runat="server"/>
            <asp:HiddenField ID="hiddenActualNumber" Value="0" runat="server" />
            <asp:Button ID="butSave" runat="server" Text="保存投票" Width="187px" Height="59px" 
                style="font-size:20px;font-weight:bolder;" OnClientClick="return getAllData()" 
                onclick="butSave_Click" />
        </center>
    </div>
    </form>
</body>
</html>
